package com.movitech.mobile.cz.base.sys.service;

import com.movitech.mobile.cz.base.modules.controller.RestReturnResult;
import com.movitech.mobile.cz.base.sys.bizvo.DictRequestVO;
import com.movitech.mobile.cz.base.sys.entity.SysDict;
import com.baomidou.mybatisplus.service.IService;
import java.util.Map;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Movitech Mobile
 * @since 2018-02-28
 */
public interface SysDictService extends IService<SysDict> {

	/**
	 * 字典表列表
	 * @param dictType
	 * @param parentId 
	 * @return
	 */
	public RestReturnResult<Object> getDictListByDictType(String dictType,Integer resultType, String parentId) throws Exception;

	/**
	 * 字典表新增/修改
	 * @param reqVO
	 * @return
	 */
	public RestReturnResult<Object> saveOrUpdateDict(DictRequestVO reqVO);

	/**
	 * 字典表删除
	 * @param id
	 * @return
	 */
	public RestReturnResult<Object> updateDictForDel(String id);

    List<SysDict> getSysDictByCode(String code);
    
    /**
     * 根据label和类型，获取字典对象
     * @param dictLabel
     * @param dictType
     * @return
     */
    public SysDict getSysDictByLabelAndType(String dictLabel,String dictType);

    /**
     * 根据value和类型，获取字典对象
     * @param dictValue
     * @param dictType
     * @return
     */
    public SysDict getSysDictByValueAndType(String dictValue,String dictType);

    Map<String,Object> selectMapByType(String type);
}
